import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';


/* import 组件（页面），除了app不需要 */
import { Echart01Component } from './../modules/views/echart01/echart01.component';
import { Echart02Component } from './../modules/views/echart02/echart02.component';
import { Echart03Component } from './../modules/views/echart03/echart03.component';
import { Ueditor01Component } from './../modules/views/ueditor01/ueditor01.component';
import { GoJS01Component } from './../modules/views/gojs01/gojs01.component';
import { Translate01Component } from './../modules/views/translate01/translate01.component';
import { GoJS02Component } from './../modules/views/gojs02/gojs02.component';

/* 一个路由配置文件 */
const routes: Routes = [
    { path: 'echart01', component: Echart01Component },
    { path: 'echart02', component: Echart02Component },
    { path: 'echart03', component: Echart03Component },
    { path: 'ueditor01', component: Ueditor01Component },
    { path: 'gojs01', component: GoJS01Component },
    { path: 'translate01', component: Translate01Component },
    { path: 'gojs02', component: GoJS02Component },
    { path: '', redirectTo: '/echart01', pathMatch: 'full' }
];
// .forRoot(routes, { enableTracing: true })，在控制台中输出路由信息
@NgModule({
    imports: [RouterModule.forRoot(routes)],
    exports: [RouterModule]
})
export class AppRoutingModule { }